By the end of today, you should:
Used properly, this workflow promotes
Core idea (Knuth 1984):
Core idea (Knuth 1984):
The document is the analysis
Our tool for literate programming: Quarto markdown files (.qmd)
Our tool for literate programming: Quarto markdown files (.qmd)
This sentence is written in italics. This one is bold. Using backticks formats text to look like code.
This sentence is written in italics. This one is bold. Using backticks formats text to look like code.
## Example of embedded figure
```r
#| echo: true
#| eval: true
#| label: fig-demo
#| fig-cap: "A demo figure"
library(forcats)
library(ggplot2)
demo_data <- data.frame(
country = c("Germany", "France", "Italy", "Spain", "Poland"),
pop = c(83, 67, 60, 47, 38)
)
ggplot(
data = demo_data,
aes(x = fct_reorder(country, pop), y = pop)
) +
geom_col(fill = "white", color = "black") +
theme_bw() +
labs(x = "Country", y = "Population in Million")
```
@fig-demo shows an embedded figure.library(forcats)
library(ggplot2)
demo_data <- data.frame(
country = c("Germany", "France", "Italy", "Spain", "Poland"),
pop = c(83, 67, 60, 47, 38)
)
ggplot(
data = demo_data,
aes(x = fct_reorder(country, pop), y = pop)
) +
geom_col(fill = "white", color = "black") +
theme_bw() +
labs(x = "Country", y = "Population in Million")Figure 3 shows an embedded figure.
What we want to avoid:
analysis_final.R
analysis_final2.R
analysis_REALLY_final.R
draft1.pdf
draft2.pdf
draft2_final.pdf
This is manual version control – and it breaks down quickly.
Remember: Git tracks changes inside files – not by duplicating them
Today, sharing code on GitHub is often part of the research output itself.
🔐 Reminder: Uploading data to US-hosted platforms can have legal implications. Never upload personal or restricted data without checking GDPR and institutional regulations.
For these pragmatic reasons, we will use GitHub in this course.
QMIR – February 13, 2026 – Week 2